package com.karry.mapper;

import com.karry.pojo.Question;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface QuestionMapper {


    //查询全部
    @Select("select * from tb_question;")
    @ResultMap("questionResultMap")
    List<Question> searchAllQuestion();


    //按照id查询
    @Select("select * from tb_question where q_id = #{id};")
    @ResultMap("questionResultMap")
    Question searchQuestionById(int id);
}
